package com.hina.rec.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 线程池配置
 *
 * @author baofu
 * @date 2024-04-01
 */
@Configuration
public class ThreadPoolConfig {

    /**
     * 创建ExecutorService实例
     * 
     * @return ExecutorService实例
     */
    @Bean
    public ExecutorService executorService() {
        // 创建一个固定大小的线程池，大小为10
        return Executors.newFixedThreadPool(10);
    }
} 